#include "DailyCoding.h"
#include "ModuleSolutions.h"
#include <string>
#include <algorithm>
#include <map>
#include <vector>
//#include <boost/geometry.hpp>
//#include <boost/geometry/core/point_type.hpp>
//#include <boost/geometry/geometry.hpp>
//#include <boost/geometry/geometries/point_xy.hpp>
//#include <boost/geometry/geometries/box.hpp>
//#include <boost/assign.hpp>
//#include <boost/geometry/index/rtree.hpp>
//#include <boost/foreach.hpp>
#include <vector>
#include <iostream>

using namespace std;

//namespace bg = boost::geometry;
//namespace bgi = boost::geometry::index;
//typedef bg::model::d2::point_xy<double, boost::geometry::cs::cartesian> DPoint;
//typedef bg::model::box<DPoint> DBox;
//typedef std::pair<DBox, unsigned> Value;

int main() {
//    vector<vector<int>> bookings{{1, 2, 10},
//                                 {2, 3, 20},
//                                 {2, 5, 25}};
//    auto res = MeduimSolutions::corpFlightBookings(bookings, 5);
//    for (const auto &i: res) printf("___i: %d\n", i);

//    bgi::rtree<Value, bgi::quadratic<16>> rtree;
//    for (unsigned i = 0; i < 10; i++) {
//        DBox b(DPoint(i + 0.0f, i + 0.0f), DPoint(i + 0.5f, i + 0.5f));
//        rtree.insert(std::make_pair(b, i));
//    }
//
//    DBox query_box(DPoint(0, 0), DPoint(5, 5));
//    vector<Value> res;
//    rtree.query(bgi::intersects(query_box), back_inserter(res));
//
//    vector<Value> resN;
//    rtree.query(bgi::nearest(DPoint(0, 0), 5), back_inserter(resN));
//
//    std::cout << "spatial query box:" << std::endl;
//    std::cout << bg::wkt<DBox>(query_box) << std::endl;
//    std::cout << "spatial query result:" << std::endl;
//    BOOST_FOREACH(Value const &v, res)std::cout << bg::wkt<DBox>(v.first) << " - " << v.second << std::endl;
//
//    std::cout << "knn query point:" << std::endl;
//    std::cout << bg::wkt<DPoint>(DPoint(0, 0)) << std::endl;
//    std::cout << "knn query result:" << std::endl;
//    BOOST_FOREACH(Value const &v, resN)std::cout << bg::wkt<DBox>(v.first) << " - " << v.second << std::endl;

    return 0;
}